package cn.edu.just.firstjavaapp.l13.exception;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class Main {
    public static void main(String[] args) throws ClassNotFoundException, FileNotFoundException {
//        int a = 10;
//        int c = a/0;   //被0除，非受检异常

//        for(int i=1;i<=10;i++){
//            System.out.println(i);
//            try {
//                Thread.sleep(1000);  //checked exception 受检异常
//            }catch(InterruptedException e){
//                System.out.println("睡眠被中断");
//            }
//        }

        // ClassNotFoundException

//        Class.forName("cn.edu.just.firstjavaapp.l13.GBox");//ClassNotFoundException
//        FileInputStream fis = new FileInputStream("abc.txt"); //FileNotFoundException
//        String s= "12x3";  //NumberFormatException
//        int a = Integer.parseInt(s);
//        int[] a = new int[10];
//        System.out.println(a[10]);
//        String s = "hello world";
//        System.out.println(s.charAt(11));
        java.util.Date now =null;

        System.out.println(now.getYear()+1900);
    }
}
